package com.feicheng.controller;


import com.feicheng.base.result.Result;
import com.feicheng.model.StockAndProduct;
import com.feicheng.service.ProviderWarehouseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hao.zhang
 * @since 2022-07-04
 */
@RestController
@RequestMapping("/stock")
public class StockController {

    @Autowired
    ProviderWarehouseController providerWarehouseController;

    /**
     * 库存列表条件分页查询接口
     * @param current 当前页
     * @param size 每页条数
     * @param stockAndProduct 出库信息
     * @author tao.jiang
     * @return
     */
    @GetMapping("/page")
    public Result selectintoheader( StockAndProduct stockAndProduct,
                                   @RequestParam(defaultValue = "1") Integer current,
                                   @RequestParam(defaultValue = "10") Integer size) {
        System.out.println(stockAndProduct);
        return providerWarehouseController.getstock(current,size,stockAndProduct);
    }
}

